package com.lm.hutool.example;

import cn.hutool.captcha.CaptchaUtil;
import cn.hutool.captcha.LineCaptcha;

public class HutoolCaptchaExample {
    public static void main(String[] args) {
        // 创建线段干扰的验证码
        LineCaptcha captcha = CaptchaUtil.createLineCaptcha(200, 100);
        System.out.println("验证码内容：" + captcha.getCode());
        captcha.write("captcha.png");
        System.out.println("验证码图片已生成！");
    }
}
